package com.ethink.system.facade.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.system.api.info.SystemOrganizationInfo;
import com.ethink.system.api.request.OrganizationAddRequest;
import com.ethink.system.api.request.OrganizationPageQueryRequest;
import com.ethink.system.api.request.OrganizationQueryRequest;
import com.ethink.system.api.request.OrganizationUpdateRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ethink.system.service.SystemOrganizationService;
import com.ethink.system.api.SystemOrganizationFacade;

import java.util.List;

/**
 * 系统组织机构表 Facade接口
 *
 * @author default
 * @date 2022-09-26
 */
@RestController
@Slf4j
@RequestMapping("system-service/facade/v1/systemOrganization")
public class SystemOrganizationFacadeImpl implements SystemOrganizationFacade {

    @Autowired
    private SystemOrganizationService systemOrganizationService;

    @Override
    public Object demo(Object request) {
        return null;
    }

    @Override
    public void add(OrganizationAddRequest request) {
        systemOrganizationService.add(request);
    }

    @Override
    public void update(OrganizationUpdateRequest request) {
        systemOrganizationService.update(request);
    }

    @Override
    public List<SystemOrganizationInfo> systemOrganizationGetAll(OrganizationQueryRequest request) {
        return systemOrganizationService.systemOrganizationGetAll(request);
    }

    @Override
    public SystemOrganizationInfo getSystemOrganizationById(Long systemOrganizationId) {
        return systemOrganizationService.getSystemOrganizationById(systemOrganizationId);
    }

    @Override
    public void systemOrganizationDelete(Long id) {
        systemOrganizationService.systemOrganizationDelete(id);
    }

    @Override
    public Page<SystemOrganizationInfo> pageQuerySystemOrganization(OrganizationPageQueryRequest request) {
        return systemOrganizationService.pageQuerySystemOrganization(request);
    }

}